#pragma once

//运营日志tid定义, ---------------顺序不能修改
enum LogTid
{
	TID_LOGIN = 1000, //角色登陆           
	TID_CREATE_CHARACTER = 1001, //创角
	TID_DEL_CHARACTER = 1002, //删角
	TID_LEVUP = 1003, //玩家等级变化
	TID_VIP_LEVUP = 1004, //玩家VIP等级变化
	TID_LEAVE = 1005, //角色登出
	TID_ONLINE_NUMBER = 1006, //实时在线人数
	TID_MALL_BUY = 1007, //商城购买
	TID_ITEM_GET = 1008, //道具获取
	TID_ITEM_DEL = 1009, //道具消耗
	TID_CURRENCY_GET = 1010, //货币获取
	TID_CURRENCY_DEL = 1011, //货币消耗
	TID_SHEN_GE = 1012, //神格
	TID_JING_LIAN = 1013, //精炼
	TID_BAOSHI = 1014, //宝石
	TID_FUWEN = 1015, //符文
	TID_GH_JX = 1016, //工会精修
	TID_MISSION_ACCPECT = 1017, //任务接取
	TID_MISSION_COMPLETE = 1018, //任务完成
	TID_MISSION_FAIL = 1019, //任务失败
	TID_AUCTIONEER = 1020, //拍卖行操作 
	TID_PAY = 1021, //充值
	TID_PAY_DEBUG = 1022, //充值日志
	TID_DEL_CHARACTER_CANCEL = 1023, //玩家取消删除角色
};

//道具或货币来源
enum ItemOrCurrencySource
{
	S_NONE               = 0,
	S_GM				 = 1,   //GM命令
	S_MALL_BUY 			 = 2,   //商店购买
	S_Drop     			 = 3,   //掉落
	S_PAY				 = 4,   //充值
	S_SIGN_IN            = 5,   //签到
	S_ACTUINEER			 = 6,   //拍卖行
	S_MISSION			 = 7,	 //任务
	S_TradeMail			 = 8,	 //交易邮箱
	S_USE_ITEM			 = 9,	 //使用物品
	S_Camp				= 10,	 //阵营
	S_ACHIEVEMENT		= 11,	 //成就
	S_DEPUTY			= 12,	 //副业
	S_GOD				= 13,	 //神格
	S_PACKAGE			= 14,	 //背包
	S_PANDOS            = 15,    //星盘
	S_SKILL_LEVEL		= 16,	 //技能升级 
	S_ACTIVE			= 17,	 //活动
	S_FRIEND			= 18,	 //好友
	S_UNION             = 19,	 //公会
	S_ARENA             = 20,    //竞技场
	S_UNION_ESCORT      = 21,    //公会押镖
	S_UNION_MALL        = 22,    //公会商店
	S_ACTIVITY_ANWSER   = 23,    //活动答题
	S_UNION_RED         = 24,    //工会红包
	S_OPERATE_ACT		= 25,	 //运营活动
	S_Breack			= 26,	 //突破
	S_UnionDrop         = 27,   //公会掉落
	S_Pet               = 28,	 //宠物
	S_Chat          	= 29,	 //聊天
	S_RunBusiness		= 30,	//跑商
	S_MALL_Exchange 	= 31,   //商店兑换
	S_Escort			= 32,	//镖车
	S_StrengenEquip     = 33,	//强化装备
	S_Sale				= 34,	//出售
	S_Refine			= 35,	//精炼
	S_MaterialCompose   = 36,	//材料合成
	S_StoneCompose		= 37,	//宝石合成
	S_DupFlop			= 38, 	//副本翻牌
	S_Identify			= 39,   //装备鉴定
	S_Dup               = 40,   //副本
	S_Born              = 41,   //创角
	S_Decompose         = 42,   //分解
	S_RuneUp            = 43,   //符文印刻
	S_ReBuy             = 44,   //回购
	S_ClearAttr         = 45,   //属性洗点
	S_TreasureCompose   = 46,   //挖宝合成
	S_Treasure			= 47,   //挖宝
	S_DeathDrop         = 48,   //死亡掉落
	S_ItemUse           = 49,   //道具使用
	S_TakeYk            = 50,   //月卡领取
	S_MissionPrestige   = 51,	//领取任务声望奖励
	S_Storage			= 52,	//仓库
	S_Mission_SubmitItem= 53,	//任务提交物品
	S_END                   ,
};

//添加来源必须加对应的名字
static const std::string l_source_name[S_END] =
{
	"NONE",
	"GM命令",
	"商店购买",
	"掉落",
	"充值",
	"签到",
	"拍卖行",
	"任务",
	"交易邮件",
	"使用物品",
	"阵营",
	"成就",
	"副业",
	"神格",
	"背包",
	"星盘",
	"技能升级",
	"活动",
	"好友",
	"公会",
	"竞技场",
	"公会押镖",
	"公会商店",
	"活动答题",
	"工会红包",
	"运营活动",
	"突破",
	"公会掉落",
	"宠物",
	"聊天",
	"跑商",
	"商店兑换",
	"镖车",
	"强化装备",
	"出售",
	"精炼",
	"材料合成",
	"宝石合成",
	"副本翻牌",
	"装备鉴定",
	"副本",
	"创角",
	"分解",
	"符文印刻",
	"回购",
	"属性洗点",
	"挖宝合成",
	"挖宝",
	"死亡掉落",
	"道具使用",
	"月卡领取",
	"领取任务声望奖励",
	"仓库"
};


struct MallLogInfo
{
	uint32_t       itemId;
	std::string    itemName;
	std::unordered_map<uint32_t, uint32_t> costMap;
	bool           discount;
	uint32_t       price;
	uint32_t       count;
};

enum EnAuctioneerOperateType
{
	enAuctioneerOperateType_Buy  =1,		  //购买
	EnAuctioneerOperateType_Sale =2,          //出售
	EnAuctioneerOperateType_SystemSaleOut =3, //系统下架
	EnAuctioneerOperateType_PlayerSaleOut =4, //玩家手动下架
};